package com.liaoyoule.multiple.dao.constant;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.core.annotation.Order;

/**
 * Created by cdyoue on 2017/1/23.
 */
@ConfigurationProperties(prefix = "spring.datasource")
@Order(1)
public class DatasourceConstant {
    public static String dbUrl;
    public static String username;
    public static String password;
    public static String driverClassName;
    public static Integer initialSize;
    public static Integer minIdle;
    public static Integer maxActive;
    public static Integer maxWait;
    public static Integer timeBetweenEvictionRunsMillis;
    public static Integer minEvictableIdleTimeMillis;
    public static String validationQuery;
    public static Boolean testWhileIdle;
    public static Boolean testOnBorrow;
    public static Boolean testOnReturn;
    public static Boolean poolPreparedStatements;
    public static Integer maxPoolPreparedStatementPerConnectionSize;
    public static String filters;
    public static String connectionProperties;

    public static String getDbUrl() {
        return dbUrl;
    }

    public static void setDbUrl(String dbUrl) {
        DatasourceConstant.dbUrl = dbUrl;
    }

    public static String getUsername() {
        return username;
    }

    public static void setUsername(String username) {
        DatasourceConstant.username = username;
    }

    public static String getPassword() {
        return password;
    }

    public static void setPassword(String password) {
        DatasourceConstant.password = password;
    }

    public static String getDriverClassName() {
        return driverClassName;
    }

    public static void setDriverClassName(String driverClassName) {
        DatasourceConstant.driverClassName = driverClassName;
    }

    public static Integer getInitialSize() {
        return initialSize;
    }

    public static void setInitialSize(Integer initialSize) {
        DatasourceConstant.initialSize = initialSize;
    }

    public static Integer getMinIdle() {
        return minIdle;
    }

    public static void setMinIdle(Integer minIdle) {
        DatasourceConstant.minIdle = minIdle;
    }

    public static Integer getMaxActive() {
        return maxActive;
    }

    public static void setMaxActive(Integer maxActive) {
        DatasourceConstant.maxActive = maxActive;
    }

    public static Integer getMaxWait() {
        return maxWait;
    }

    public static void setMaxWait(Integer maxWait) {
        DatasourceConstant.maxWait = maxWait;
    }

    public static Integer getTimeBetweenEvictionRunsMillis() {
        return timeBetweenEvictionRunsMillis;
    }

    public static void setTimeBetweenEvictionRunsMillis(Integer timeBetweenEvictionRunsMillis) {
        DatasourceConstant.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
    }

    public static Integer getMinEvictableIdleTimeMillis() {
        return minEvictableIdleTimeMillis;
    }

    public static void setMinEvictableIdleTimeMillis(Integer minEvictableIdleTimeMillis) {
        DatasourceConstant.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
    }

    public static String getValidationQuery() {
        return validationQuery;
    }

    public static void setValidationQuery(String validationQuery) {
        DatasourceConstant.validationQuery = validationQuery;
    }

    public static Boolean getTestWhileIdle() {
        return testWhileIdle;
    }

    public static void setTestWhileIdle(Boolean testWhileIdle) {
        DatasourceConstant.testWhileIdle = testWhileIdle;
    }

    public static Boolean getTestOnBorrow() {
        return testOnBorrow;
    }

    public static void setTestOnBorrow(Boolean testOnBorrow) {
        DatasourceConstant.testOnBorrow = testOnBorrow;
    }

    public static Boolean getTestOnReturn() {
        return testOnReturn;
    }

    public static void setTestOnReturn(Boolean testOnReturn) {
        DatasourceConstant.testOnReturn = testOnReturn;
    }

    public static Boolean getPoolPreparedStatements() {
        return poolPreparedStatements;
    }

    public static void setPoolPreparedStatements(Boolean poolPreparedStatements) {
        DatasourceConstant.poolPreparedStatements = poolPreparedStatements;
    }

    public static Integer getMaxPoolPreparedStatementPerConnectionSize() {
        return maxPoolPreparedStatementPerConnectionSize;
    }

    public static void setMaxPoolPreparedStatementPerConnectionSize(Integer maxPoolPreparedStatementPerConnectionSize) {
        DatasourceConstant.maxPoolPreparedStatementPerConnectionSize = maxPoolPreparedStatementPerConnectionSize;
    }

    public static String getFilters() {
        return filters;
    }

    public static void setFilters(String filters) {
        DatasourceConstant.filters = filters;
    }

    public static String getConnectionProperties() {
        return connectionProperties;
    }

    public static void setConnectionProperties(String connectionProperties) {
        DatasourceConstant.connectionProperties = connectionProperties;
    }
}
